package com.wondertek.service.entity.sys;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wondertek.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * @author xqs
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_depart")
public class SysDepartPo extends BaseEntity {

    /**
     * 父级id
     */
    private String parentId;

    /**
     * 部门名称
     */
    @Schema(name = "departName",description = "部门名称")
    private String departName;

    /**
     * 部门类型
     */
    @Schema(name = "departType",description = "部门类型")
    private String departType;

    /**
     * 部门编码
     */
    @Schema(name = "departCode",description = "部门编码")
    private String departCode;

    /**
     * 负责人
     */
    @Schema(name = "leader",description = "负责人")
    private String leader;

    /**
     * 电话
     */
    @Schema(name = "phone",description = "电话")
    private String phone;

    /**
     * 地址
     */
    @Schema(name = "address",description = "地址")
    private String address;

    /**
     * 邮箱
     */
    @Schema(name = "email",description = "邮箱")
    private String email;

    /**
     * 排序
     */
    @Schema(name = "sort",description = "排序")
    private Integer sort;

    /**
     * 启用 ENABLE 关闭 DISABLE
     */
    @Schema(name = "status",description = "启用 ENABLE 关闭 DISABLE")
    private String status;

    //************ 以下非数据库字段 ***************

    @TableField(exist = false)
    @Schema(name = "children",description = "子部门")
    private List<SysDepartPo> children = new ArrayList<>();
}
